package src;

import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

/**
 * @author GUI-Programmer
 * @version 09.11.2011 18:50
 */
public class Rect extends Figure {
	@Override
	public String getDiscription() {
		return "Rechteck an Positon "+getX()+", "+getY();
	}

	@Override
	public void paintObject(Graphics2D g2) {
		g2.setColor(getColor());
		Rectangle2D.Double rectangle = new Rectangle2D.Double(getX(), getY(), getWidth(), getHeight());
		if(getFill()) g2.fill(rectangle);
		else g2.draw(rectangle);
	}
}